package com.mvc.controller;

import java.util.LinkedList;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.db.entity.Project;

@Controller
@RequestMapping("/wh")
public class WorkingHourController {
	
	private static Logger log = Logger.getLogger(WorkingHourController.class);
	
	@RequestMapping({"/write","/"})
	public String writeWorkingHour(Model model){
		List<Project> projects = new LinkedList<Project>();
		Project p = new Project();
		p.setProjectid(1111);
		p.setProjectName("浙江智能计算");
		projects.add(p);
		
		p = new  Project();
		p.setProjectid(1131);
		p.setProjectName("宁波智能计算");
		projects.add(p);
		
		p = new  Project();
		p.setProjectid(1113);
		p.setProjectName("华东智能计算");
		projects.add(p);
		
		model.addAttribute("projects", projects);
		return "working-hour/write";
	}
	
	
}
